From: Carlos Garnacho Date: Tue, 12 Mar 2019 00:53:16 +0000 (+0100) Subject: dnd: Make startDrag() fail if there is a current grab X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~871^2^2~35 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4a7e2ddff521e32b7206e5f346d2fc699400a345;p=gnome-shell.git dnd: Make startDrag() fail if there is a current grab This call just went through stomping over previous drag operations if any, _maybeStartDrag() accounted for this, but other callers (well, WindowClone in workspace.js) don't. This must bail out early even if a drag operation is requested, luckily all callers account for it already. This broke shell state by preserving connected captured-event handlers if one tried to drag multiple windows simultaneously through multitouch. We of course don't support that, now more elegantly. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/455 --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 614ea621d..929ee0e22 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -306,6 +306,9 @@ var _Draggable = class _Draggable { * for the draggable. */ startDrag(stageX, stageY, time, sequence, device) { + if (currentDraggable) + return; + if (device == undefined) { let event = Clutter.get_current_event();